#pragma once
#ifndef H_Quad
#define H_Quad

#include <stdio.h>
#include <vector>

#include "Plane.h"
#include "Triangle.h"
#include "Object.h"
#include "Ray.h"

class Quad: public Plane {
	public:
		Quad(Vector3 center, Vector3 normal, float width, float height);
		
		Object* tIntersect(const Ray& ray, float& distance);
		Color getExtraColor(Vector3 p);
		bool inTriangle(Vector3 p, Triangle tri);
		
		Vector3 center;
		float distanceFromOrigin;
		float width, height;

		vector<Triangle> causticTriangles;
};
#endif